<%@page import="com.drerp.RH.Colaborador"%>
<%@page import="com.drerp.RH.Contrato"%>
<%@page import="com.drerp.RH.Cargo"%>

<%@page import="java.util.List"%>  

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="StyleSheet" href="../styles.css" type="text/css" media=screen />

<title>Editar Colaborador</title>

</head>
<body>

<% 
	long cargo_id = Long.parseLong(request.getParameter("id"));
	Cargo cargo = Cargo.encontrarCargoPorId(cargo_id);
%>

<jsp:include page="/nav/header.jsp" />

<div class="body">
	
	<jsp:include page="/nav/menu.jsp" />
	
	<div class="center">
	
		<h1>Editar Cargo</h1>
		
		<form action="salvar.jsp" method="post">
			<div class="inner_center">
				<div class="title" style="width: 160px;">Dados do Cargo</div>
				
					<div style="float: left; margin: 20px;">
						<input type="hidden" name="id" value="<%=cargo_id%>">
						Nome: <input type="text" name="nome" value="<%= cargo.getNome() == null? "" : cargo.getNome() %>"/><br />
						Descrição: <textarea name ="descricao"><%= cargo.getDescricao() == null? "" : cargo.getDescricao()%></textarea><br />
						Salario Base: <input type="text" name="salario_base" value="<%= cargo.getSalario_base() == null? "" : cargo.getSalario_base()%>"/><br />
					</div>
					
			
			</div>
			
			<br />
			<div style="float: right; margin: 10px 20px;">
				<input type="submit" class="button" value="Salvar" />&nbsp;
				<a href="lista.jsp" class="button" style="margin: 10px;">Voltar</a>
			</div>
		</form>
		
	</div>
	
</div>

</body>
</html>